home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue3 / Games / xrick / !xrick / include / h / game < prev    next >
Text File  |  2004-06-24  |  2KB  |  95 lines

  1. /*
  2.  * xrick/include/game.h
  3.  *
  4.  * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved.
  5.  *
  6.  * The use and distribution terms for this software are contained in the file
  7.  * named README, which can be found in the root of this distribution. By
  8.  * using this software in any fashion, you are agreeing to be bound by the
  9.  * terms of this license.
  10.  *
  11.  * You must not remove this notice, or any other, from this software.
  12.  */
  13.  
  14. #ifndef _GAME_H
  15. #define _GAME_H
  16.  
  17. #include <stddef.h> /* NULL */
  18.  
  19. #include "system.h"
  20. #include "config.h"
  21.  
  22. #include "rects.h"
  23. #include "data.h"
  24.  
  25. #define LEFT 1
  26. #define RIGHT 0
  27.  
  28. #define TRUE 1
  29. #define FALSE 0
  30.  
  31. #define GAME_PERIOD 75
  32.  
  33. #define GAME_BOMBS_INIT 6
  34. #define GAME_BULLETS_INIT 6
  35.  
  36. typedef struct {
  37.   U32 score;
  38.   U8 name[10];
  39. } hscore_t;
  40.  
  41. extern U8 game_lives;      /* lives counter */
  42. extern U8 game_bombs;      /* bombs counter */
  43. extern U8 game_bullets;    /* bullets counter */
  44.  
  45. extern U32 game_score;     /* score */
  46.  
  47. extern hscore_t game_hscores[8];  /* highest scores (hall of fame) */
  48.  
  49. extern U16 game_map;       /* current map */
  50. extern U16 game_submap;    /* current submap */
  51.  
  52. extern U8 game_dir;        /* direction (LEFT, RIGHT) */
  53. extern U8 game_chsm;       /* change submap request (TRUE, FALSE) */
  54.  
  55. extern U8 game_waitevt;    /* wait for events (TRUE, FALSE) */
  56. extern U8 game_period;     /* time between each frame, in millisecond */
  57.  
  58. extern rect_t *game_rects; /* rectangles to redraw at each frame */
  59.  
  60. extern void game_run(void);
  61. extern void game_setmusic(char *name, U8 loop);
  62. extern void game_stopmusic(void);
  63.  
  64.  
  65. #ifdef ENABLE_CHEATS
  66. extern U8 game_cheat1;     /* infinite lives, bombs and bullets */
  67. extern U8 game_cheat2;     /* never die */
  68. extern U8 game_cheat3;     /* highlight sprites */
  69. extern void game_toggleCheat(U8);
  70. #endif
  71.  
  72. #ifdef ENABLE_SOUND
  73. extern sound_t *WAV_GAMEOVER;
  74. extern sound_t *WAV_SBONUS2;
  75. extern sound_t *WAV_BULLET;
  76. extern sound_t *WAV_BOMBSHHT;
  77. extern sound_t *WAV_EXPLODE;
  78. extern sound_t *WAV_STICK;
  79. extern sound_t *WAV_WALK;
  80. extern sound_t *WAV_CRAWL;
  81. extern sound_t *WAV_JUMP;
  82. extern sound_t *WAV_PAD;
  83. extern sound_t *WAV_BOX;
  84. extern sound_t *WAV_BONUS;
  85. extern sound_t *WAV_SBONUS1;
  86. extern sound_t *WAV_DIE;
  87. extern sound_t *WAV_ENTITY[];
  88. #endif
  89.  
  90. #endif
  91.  
  92. /* eof */
  93.  
  94.  
  95.